package com.dy.lock.screen.dao.impl;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.dy.lock.screen.dao.MerchantAddressDao;
import com.dy.lock.screen.pojo.MerchantAddress;

@Repository("merchantAddressDao")
public class MerchantAddressDaoImpl extends
		BaseDaoImpl<MerchantAddress, String> implements MerchantAddressDao {

	@Override
	public String getQueryNamespace() {
		return "mybatis.xml.MerchantAddressMapper";
	}

	@Override
	public List<MerchantAddress> queryByMerchantId(String merhcantId) {
		List<MerchantAddress> list = this.getSqlSession().selectList(
				getQueryNamespace() + ".queryByMerchantId", merhcantId);
		return list;
	}

	@Override
	public List<MerchantAddress> queryNearestMerchant(
			Map<String, Object> paramMap) {
		List<MerchantAddress> list = this.getSqlSession().selectList(
				getQueryNamespace() + ".queryNearestMerchant", paramMap);
		return list;
	}

}
